waxClass{"UnlimitedReattack",HNAbstractLogic}
function init(self)
self.super:init()
self.unreattack = 0
return self
end

function act (self,b,a,queue)
    print ('--reattack--')
    if self.unreattack == 1 then
        self.unreattack = 0
        return
    end
local damage = a.maxdamage
b.tllhp = (b:count()-1)*(b.maxhp) + b.hp
b.tllhp = b.tllhp - damage * a.attack / b.defense 

b:setCount(b.tllhp/b.maxhp)
b.hp = b.tllhp%b.maxhp
print(b.hp)
    center:addObject_forKey(a,'attack')
    if b.hp >= 0 then
        center:addObject_forKey(b,'beattacked')
    else
        center:addObject_forKey(b,'die')
    end
    return 0
end


function reset(self)
return
end


function deact(self)
self.unreattack = 1
end